import request from '@/router/axios';
import serviceList from '@/config/serviceList'
import {baseURL} from '@/api/common';

const {aihumanCore} = serviceList
// 根据type查询对应分组
export const getListByType = (params) => {
  return request({
    url: `${baseURL}api/${aihumanCore}/aimetaAssetsGroup/getListByType`,
    method: 'get',
    params
  })
}
export const getPageList = (data) => {
  return request({
    url: `${baseURL}api/${aihumanCore}/aimetaAssetsSoundType/getPageList`,
    method: 'post',
    data
  })
}
export const uploadSound = (data) => {
  return request({
    url: `${baseURL}api/${aihumanCore}/aimetaFile/upload`,
    method: 'post',
    timeout: 0,
    data
  })
}
export const addOrUpdateSound = (data) => {
  return request({
    url: `${baseURL}api/${aihumanCore}/aimetaAssetsSoundType/addOrUpdateSound`,
    method: 'post',
    data
  })
}
export const deleteSound = (data) => {
  return request({
    url: `${baseURL}api/${aihumanCore}/aimetaAssetsSoundType/deleteSound`,
    method: 'post',
    data
  })
}
export const changeStatus = (params) => {
  return request({
    url: `${baseURL}api/${aihumanCore}/aimetaAssetsSoundType/changeStatus`,
    method: 'get',
    params
  })
}
export const aimetaBaseDictItem = (data) => {
  return request({
    url: `${baseURL}api/${aihumanCore}/aimetaBaseDictItem/listPage`,
    method: 'post',
    data
  })
}

export const getManufacturerServiceList = () => {
  return request({
    url: `${baseURL}api/${aihumanCore}/aiHumanTtsManufacturer/getManufacturerServiceList`,
    method: 'post',
    data: {}
  })
}
